package com.handsome.中介者模式;

/**
 * 抽象的同事类
 * @author niechun
 * @date 2023/3/19 17:18
 */
public abstract class Colleague {
    private Mediator mediator;
    private String name;

    public String getName() {
        return name;
    }

    public Colleague(Mediator mediator, String name) {
        this.mediator = mediator;
        this.name = name;
    }

    public abstract void sendMessage(int stateChange);

    public Mediator getMediator() {
        return this.mediator;
    }
}
